import {smallcard_inventory} from "G:/SCEBeta/Update/e.alpha.sce.xd.com/Res/maps/script_libs/smallcard_inventory/ui/script/"
import {smallcard_mail} from "G:/SCEBeta/Update/e.alpha.sce.xd.com/Res/maps/script_libs/smallcard_mail/ui/script/"
import {defaultui} from "G:/SCEBeta/Update/e.alpha.sce.xd.com/Res/maps/defaultui/ui/script/"
import {lib_common_ai} from "G:/SCEBeta/Update/e.alpha.sce.xd.com/Res/maps/ai_templates/lib_common_ai/ui/script/"
import {lib_control} from "G:/SCEBeta/Update/e.alpha.sce.xd.com/Res/maps/script_libs/lib_control/ui/script/"
import {smallcard_conversation} from "G:/SCEBeta/Update/e.alpha.sce.xd.com/Res/maps/script_libs/smallcard_conversation/ui/script/"
export module tiandimigong_p81b {
	export let 创建Toast:(Toast文案:string)=>void= (Toast文案:string):void => {
		let Toast面板:_OBJ__gui_ctrl_panel | undefined = undefined;
		let Toast文字:_OBJ__gui_ctrl_label | undefined = undefined;
		let ToastPage:_OBJ__gui_ctrl_gui_ctrl | undefined = undefined;
		ToastPage = base.gui_new("ToastPage");
		Toast文字 = base.gui_get_part_as<_OBJ__gui_ctrl_label>(ToastPage, "toast文字");
		Toast面板 = base.gui_get_part_as<_OBJ__gui_ctrl_panel>(ToastPage, "toast面板");
		Toast文字.text = Toast文案;
		base.timer_wait(2, (计时器:Timer):void => {
			Toast面板.layout.relative[2] = -100;
			Toast面板.show = false;
		});
		base.timer_wait(2, (计时器:Timer):void => {
			base.gui_destory(ToastPage);
		});
	}
	export class 控制台点击 extends TriggerEvent{
		constructor(public obj:base.gameClass, public 控制台按钮参数:string) {
			super()
		}
		readonly event_name: string = "控制台点击"
		readonly autoForward: boolean = true
	}
	//以下为转发事件
}
export module validator {
	//$$default_units_ts.unit.火龙.MoverFunction.Data.Game.FunctionClient_UI
	/** @noSelf */
	export let validator_38385052:(移动器Id:Preset<"mover_id">, 流逝时间:number, 弹道单位:Unit, 施法者单位:Unit, 目标单位:Unit, 发射点:Point, 目标点:Point)=>void= (移动器Id:Preset<"mover_id">, 流逝时间:number, 弹道单位:Unit, 施法者单位:Unit, 目标单位:Unit, 发射点:Point, 目标点:Point):void => {
		let 半径:number = (base.point_distance(发射点, 目标点) * 0.5);
		let 初始角度:number = base.point_angle(目标点, 发射点);
		let 圆心:Point = base.point_move(目标点, 初始角度, 半径);
		let 当前位置:Point = base.point_move(圆心, (初始角度 + (流逝时间 * 100)), 半径);
		base.set_unit_location_and_height(弹道单位, 当前位置, 150);
	}

	/////控制台按钮.lua
	/** @noSelf */
	export let validator_85459057:(ctrl:_OBJ__gui_ctrl_button, mouse_btn_id:number)=>void= (ctrl:_OBJ__gui_ctrl_button, mouse_btn_id:number):void => {
		let 新变量:undefined = undefined;
		log.debug("按下的按钮参数为", ctrl.CustomString);
		ctrl.scale = 0.9;
		base.timer_wait(0.1, (计时器:Timer):void => {
			ctrl.scale = 1;
		});
		base.send_custom_event(new tiandimigong_p81b.控制台点击(((base.game) as unknown as base.gameClass), ctrl.CustomString));
		tiandimigong_p81b.创建Toast(ctrl.CustomString);
	}

	/////点击开始.lua
	/** @noSelf */
	export let validator_32974356:(ctrl:_OBJ__gui_ctrl_button, mouse_btn_id:number)=>void= (ctrl:_OBJ__gui_ctrl_button, mouse_btn_id:number):void => {
		ctrl.scale = 0.9;
		base.timer_wait(0.1, (计时器:Timer):void => {
			ctrl.scale = 1;
		});
	}

	//init validators
	function init_validator_0() {
		let data: any = undefined
		if (data = base.eff.cache("$$default_units_ts.unit.火龙.MoverFunction")) {
			data.FunctionClient_UI = validator_38385052
		}
	}
	init_validator_0()
}
